package com.allen.imsystem.chat.model.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="PrivateChat对象", description="")
public class PrivateChat implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "会话id")
    @TableId(value = "chat_id", type = IdType.NONE)
    private Long chatId;

    @ApiModelProperty(value = "用户a uid 与b相比较小")
    private String uidA;

    @ApiModelProperty(value = "用户b ")
    private String uidB;

    @ApiModelProperty(value = "对用户a是否有效")
    private Boolean userAStatus;

    @ApiModelProperty(value = "对用户b是否有效")
    private Boolean userBStatus;

    @ApiModelProperty(value = "用户A未读消息数")
    private Integer userAUnreadMsgCount;

    @ApiModelProperty(value = "用户A未读消息数")
    private Integer userBUnreadMsgCount;

    @ApiModelProperty(value = "最后一条消息的发送者uid")
    private String lastSenderId;

    @ApiModelProperty(value = "最后一条消息id")
    private Long lastMsgId;

    @ApiModelProperty(value = "最后一条消息的内容")
    private String lastMsgContent;

    @ApiModelProperty(value = "最后一条消息的创建时间")
    private Date lastMsgCreateTime;

    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


}
